<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:o="http://openfaces.org/"
      xmlns:ui="http://java.sun.com/jsf/facelets">

	<head>
	</head>
	<body>
		<ui:composition template="/templates/default.xhtml">
		 	<ui:define name="title">OpenHDS - Death Details</ui:define>
		
			<ui:param name="crud" value="#{deathCrud}" />
			
			<ui:define name="listing">
				<ui:include src="list.xhtml" />
			</ui:define>
			<ui:define name="display">
			
				<h:outputText value="#{navController.breadcrumbTrail}" />
			
		        <h1>#{msg.deathDetail}</h1>
		        <h:form>
		             
		            <h:outputText styleClass="error" value="#{deathCrud.item.statusMessage}" />
		    
                    <h:panelGrid columns="3">
                    
                        <f:verbatim><h3>Basic Information</h3></f:verbatim>
	            		<h:outputText />
	            		<h:outputText />
                    
                    	<h:outputText value="#{msg.fieldWorkerId}:"/>
                    	<h:outputText />
                        <h:outputText value="#{deathCrud.item.collectedBy}" converter="#{fieldWorkerExtIdConverter}" />
                        
	                   	<h:outputText value="#{msg.visitId}:"/>
	                   	<h:outputText />
	                   	<h:outputText value="#{deathCrud.item.visit}" converter="#{visitExtIdConverter}" />
                    
                    	<h:outputText value="Date of Interview: (#{siteProperties.dateFormat}):" />
                        <h:outputText />
                        <h:outputText value="#{deathCrud.item.recordedDate}" converter="#{calendarConverter}" />
                    	
		            	<h:outputText value="Permanent Id:"/>
		            	<h:outputText />
		                <h:outputText value="#{deathCrud.item.individual}" converter="#{individualExtIdConverter}" />

						<h:outputText value="House Id:"/>
		            	<h:outputText />
		                <h:outputText value="#{deathCrud.item.house}" converter="#{locationExtIdConverter}" />
						
						<h:outputText value="Household Id:"/>
		            	<h:outputText />
		                <h:outputText value="#{deathCrud.item.household}" converter="#{socialGroupExtIdConverter}"/>

						<h:outputText value="Household Name:" />
						<h:outputText />
						<h:outputText value="#{deathCrud.item.household.groupName}" />
						
                        <h:outputText value="#{msg.deathDate} (#{siteProperties.dateFormat})" />
                        <h:outputText />
                        <h:outputText value="#{deathCrud.item.deathDate}" converter="#{calendarConverter}" />

						<h:outputText value="Deceased Name:" />
						<h:outputText />
						<h:outputText value="#{deathCrud.item.deceasedName}" />
						
						<h:outputText value="Sex:"/>
	                	<img class="clickable" onclick="O$('popupWindowForSex').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
	                	<h:outputText value="#{deathCrud.item.gender}" /> 

                        <h:outputText value="#{msg.deathPlace}:"/>
                        <img class="clickable" onclick="O$('popupWindowForPlaceOfDeath').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                        <h:outputText value="#{deathCrud.item.deathPlace}" />

						<h:outputText value="Other:"/>
	                    <h:outputText />
	                    <h:outputText value="#{deathCrud.item.placeOfDeathOther}" />

	            		<f:verbatim><h3>Source of Information</h3></f:verbatim>
						<h:outputText />
						<h:outputText />

                    	<h:outputText value="Reported By:"/>
                		<img class="clickable" onclick="O$('popupWindowForReportedBy').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                		<h:outputText value="#{deathCrud.item.reportedBy}" />
                    </h:panelGrid>
					<br />
					<h:commandButton value="Cancel" immediate="true" action="cancel" rendered="#{flowScope.updating}" />
					<h:commandButton action="#{deathCrud.editSetup}" value="#{msg.lblEdit}" rendered="#{flowScope == null}">
		               <f:setPropertyActionListener target="#{jsfService.itemId}" value="#{deathCrud.item.uuid}" />
		           	</h:commandButton>
		        </h:form>
			</ui:define>		
		</ui:composition>
	</body>
</html>